package com.mryang.ladder;

import java.util.Scanner;

/**
 * @ClassName L1_023
 * @Description TODO 输出GPLT
 *                   输入长度不超过10000仅由英文字母构成的字符串，按GPLT的顺序输出,且仅输出GPLT
 * @Author Genius
 * @Date 2021/2/15 9:33
 */
public class L1_023 {
    public static void main(String[] args) {
        Scanner scr = new Scanner(System.in);
        String string = scr.next().toString();
        int num_G = 0;
        int num_P = 0;
        int num_L = 0;
        int num_T = 0;
        char[] char_G = new char[string.length()];
        char[] char_P = new char[string.length()];
        char[] char_L = new char[string.length()];
        char[] char_T = new char[string.length()];

        for (int i = 0; i < string.length(); i++) {
            switch (string.charAt(i)) {
                case 'G':
                    char_G[num_G] = 'G';
                    num_G++;
//                    System.out.print("G");
                    break;
                case 'P':
                    char_P[num_P] = 'P';
                    num_P++;
//                    System.out.print("P");
                    break;
                case 'L':
                    char_L[num_L] = 'L';
                    num_L++;
//                    System.out.print("L");
                    break;
                case 'T':
                    char_T[num_T] = 'T';
                    num_T++;
//                    System.out.print("T");
                    break;
                case 'g':
                    char_G[num_G] = 'g';
                    num_G++;
//                    System.out.print("g");
                    break;
                case 'p':
                    char_P[num_P] = 'p';
                    num_P++;
//                    System.out.print("p");
                    break;
                case 'l':
                    char_L[num_L] = 'l';
                    num_L++;
//                    System.out.print("l");
                    break;
                case 't':
                    char_T[num_T] = 't';
                    num_T++;
//                    System.out.print("t");
                    break;
            }
        }
        for (int i = 0; i < string.length(); i++) {
            System.out.println(char_G[i]+char_P[i]+char_L[i]+char_T[i]);
        }
    }
}
